/* 通用样式，重置部分默认样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 页面背景及字体设置 */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
}

/* 固定菜单栏在页面顶部 */
header {
    width: 100%;
    background-color: #e60000; /* 设置菜单栏背景为红色 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    text-align: center;
}

.header-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

/* 菜单栏样式 */
.navbar ul {
    list-style: none;
    display: flex;
    justify-content: center;
}

.navbar ul li {
    margin-right: 20px;
}

.navbar ul li a {
    text-decoration: none;
    color: white;
    transition: color 0.3s ease;
}

.navbar ul li a:hover {
    color: #ffd1d1; /* 悬停为浅红 */
}

/* 主要内容部分 */
main {
    margin-top: 80px; /* 给固定的菜单栏预留空间 */
    max-width: 1200px;
    width: 100%;
    padding: 20px;
    text-align: center;
}

/* 帖子容器 */
article.post {
    width: 100%;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* 帖子标题 */
article.post h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
}

/* 帖子分类 */
article.post .category {
    font-size: 14px;
    color: #e60000;
    margin-bottom: 10px;
}

/* 发布者与发布时间 */
article.post .author-info {
    font-size: 14px;
    color: #777;
    margin-bottom: 10px;
}

/* 帖子内容 */
article.post .excerpt {
    font-size: 16px;
    color: #555;
    margin-bottom: 15px;
}

/* 阅读更多链接 */
article.post .read-more {
    text-decoration: none;
    color: #e60000;
    font-weight: bold;
    transition: color 0.3s ease;
}

article.post .read-more:hover {
    color: #cc0000;
}

/* 底部 */
footer {
    width: 100%;
    text-align: center;
    padding: 10px 0;
    background-color: #e60000;
    color: white;
}
